package com.ruoyi.business.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.business.domain.RepairReservation;
import org.apache.ibatis.annotations.Param;

/**
 * 维修预约Mapper接口
 * 
 * @author xjl
 * @date 2024-09-11
 */
public interface RepairReservationMapper extends BaseMapper<RepairReservation>
{
    /**
     * 查询维修预约
     * 
     * @param id 维修预约主键
     * @return 维修预约
     */
    public RepairReservation selectRepairReservationById(Long id);

    /**
     * 查询维修预约列表
     * 
     * @param repairReservation 维修预约
     * @return 维修预约集合
     */
    public List<RepairReservation> selectRepairReservationList(RepairReservation repairReservation);

    /**
     * 新增维修预约
     * 
     * @param repairReservation 维修预约
     * @return 结果
     */
    public int insertRepairReservation(RepairReservation repairReservation);

    /**
     * 修改维修预约
     * 
     * @param repairReservation 维修预约
     * @return 结果
     */
    public int updateRepairReservation(RepairReservation repairReservation);

    /**
     * 删除维修预约
     * 
     * @param id 维修预约主键
     * @return 结果
     */
    public int deleteRepairReservationById(Long id);

    /**
     * 批量删除维修预约
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteRepairReservationByIds(Long[] ids);
    /*根据维修状态和维修方式查询维修任务列表*/
    List<RepairReservation> selectRepairTasksByStatusAndMethod(@Param("status") Long status, @Param("type") String type);
    /*根据维修任务id查询维修任务*/
    RepairReservation selectRepairTaskById(Long id);
    /*修改当前详情页的订单的状态为进行中*/
    int updateRepairTaskStatus(RepairReservation repairReservation);

    /*修改当前详情页的订单的状态为已完成*/
    int updateRepairTaskStatus2(RepairReservation repairReservation);
}
